<?php

/**
 * 阅读文章页面
 */
defined('EMLOG_ROOT') || exit('access denied!');
?>

<script>
  var gid = "<?= $logid ?>"
</script>
<?php
include View::getView('php_module/head/markdown_theme');
?>
<div class="main" role="main">
  <div class="container">
    <div class="main-content post-content">
      <div class="main-left">

        <?php include View::getView('php_module/echo_log/log_tool'); ?>

        <div class="article-content-wrapper">
          <div class="article-content-card-head" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
            <h1 class="article-content-title"><?= $log_title ?></h1>
            <div class="article-content-author">
              <a class="article-content-author-name" href="<?= Url::author($author) ?>" target="_self" itemprop="url" rel="author"><?= author_name($author) ?></a>
              <time class="article-content-time" datetime="<?= date('Y-n-j', $date) ?>" itemprop="datePublished"><?= date('Y-n-j', $date) ?></time>
              <span class="article-content-views">
                <i class="iconfont icon-liulan article-content-views-icon"></i><?= $views ?></span>
              <span class="article-content-reading-time"></span>
            </div>
          </div>


          <article class="article-content yublog_article_content markdown-body" itemscope="" itemtype="http://schema.org/BlogPosting">
            <?= addAnchorPoint($log_content) ?>
          </article>

          <?php include View::getView('php_module/echo_log/relevant') ?>
          <?php include View::getView('php_module/echo_log/copyright') ?>
          <?php doAction('log_related', $logData)  ?>
        </div>

        <div class="comment immersion-hide" id="comments">
          <div class="comment-content">
            <h3 class="comment-title">评论</h3>
            <?php blog_comments_post($logid, $ckname, $ckmail, $ckurl, $verifyCode, $allow_remark) ?>

            <div class="comment-list-wrapper">
              <h3 class="comments-list-title">全部评论</h3>
              <ol class="comment-list">
                <?php blog_comments($comments, $comnum) ?>
              </ol>
            </div>
          </div>
        </div>

      </div>
      <div class="main-right">
        <?php blog_widget_blogger($author, $logid, $views, date('Y-n-j', $date)) ?>
        <?php include View::getView('side') ?>
      </div>
    </div>
  </div>
</div>
<?php include View::getView('footer') ?>